package experiment10;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Arc;
import javafx.scene.shape.ArcType;
import javafx.scene.shape.Circle;
import javafx.stage.Stage;

public class No_2 extends Application {

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) {
        GridPane pane=new GridPane();
        pane.add(new FanPane(),0,0);
        pane.add(new FanPane(),0,1);
        pane.add(new FanPane(),1,0);
        pane.add(new FanPane(),1,1);

        primaryStage.setTitle("Fan");
        primaryStage.setScene(new Scene(pane));
        primaryStage.show();
    }
}

class FanPane extends Pane {
    double radius = 50;

    public FanPane() {
        Circle circle = new Circle(60, 60, radius);
        circle.setStroke(Color.BLACK);
        circle.setFill(Color.WHITE);
        getChildren().add(circle);
        Arc arc1 = new Arc(60, 60, 40, 40, 30, 35);
        arc1.setFill(Color.RED); // Set fill color
        arc1.setType(ArcType.ROUND);
        Arc arc2 = new Arc(60, 60, 40, 40, 30 + 90, 35);
        arc2.setFill(Color.RED); // Set fill color
        arc2.setType(ArcType.ROUND);
        Arc arc3 = new Arc(60, 60, 40, 40, 30 + 180, 35);
        arc3.setFill(Color.RED); // Set fill color
        arc3.setType(ArcType.ROUND);
        Arc arc4 = new Arc(60, 60, 40, 40, 30 + 270, 35);
        arc4.setFill(Color.RED); // Set fill color
        arc4.setType(ArcType.ROUND);

        getChildren().addAll(arc1, arc2, arc3, arc4);
    }
}
